package com.zy.mc_module.utils.retrofit.error;

/**
 * Created on 18/11/30
 */
public class ThdException extends Exception {
    public int code;
    public String message;
    public String otherMsg;

    public ThdException(String message) {
        super(message);
        this.message = message;
    }

    public ThdException(Throwable throwable, int code) {
        super(throwable);
        this.code = code;
    }

    public ThdException(String message, int code) {
        this.code = code;
        this.message = message;
    }

    public ThdException(String message, String otherMsg, int code) {
        this.code = code;
        this.message = message;
        this.otherMsg = otherMsg;
    }

    @Override
    public String toString() {
        return "error {" +
                " code=" + code +
                " , message='" + message + '\'' +
                " , otherMsg='" + otherMsg + '\'' +
                '}';
    }
}
